<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="root">
        <div class="item"> 1 </div>
        <div class="item"> 2 </div>
</body>

<style>
    .root{
        width: 600px;
        height: 500px;
        border: 1px solid lightgray;
        margin-top: 50px;
        margin-left: 50px;
        padding: 10px;
        display: flex;
        justify-content: center;
        flex-flow: column wrap;
        gap: 5px;

        /* 主轴方向 main start -> main end */
        /* xxx-reveres 只是元素的排序是顺序还是倒序 */
        /* row、 column、 row-reveres、 column-reverse */
        /* flex-direction: row;  */
        

        /* wrap: 换行
           nowrap: 不换号(子元素的总跨度,超出父元素宽度,会压缩子元素的宽度)
        */
        /* flex-wrap: wrap; */


        /* 交叉轴的对齐方式(多行) 
           start、end、center、space-between、
           space-around、space-evenly、stretch
           */
        /* align-content: stretch; */

        /* 主轴对齐方式 
           start、end、center、space-between、
           space-around、space-evenly、stretch(不应该用在主轴对齐方式上)
        */
        /* justify-content: start;  */


        /* 交叉轴对齐方式(单行)
           start、end、center、space-between、
           space-around、space-evenly、stretch(交叉轴方向的size为auto)
        */
        /* align-items: start; */
    }
    .item{
        width: 100px;
        height: 100px;
        text-align: center;
    }
    .item:nth-of-type(1){
        background: red;
    }
    .item:nth-of-type(2){
        /* margin-left: 40px; */
        background: green;
       
    }
    .item:nth-of-type(3){
        margin-left: auto;
        background: blue;
       
    }
    .item:nth-of-type(4){
        background-color: #333;
    }
    /* .
    .item:nth-of-type(5){
        background-color: aqua;
    }
    .item:nth-of-type(6){
        background-color: #aac;
    }
    .item:nth-of-type(7){
        background: #fa9;
    } */
</style>
    

</html>